--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\KaSchulz\Documents\Abraham, Doligalski, Schulz, Werquin\Web Appendix\Lemieux_et_al_Mean_Earnings.log
  log type:  text
 opened on:  20 Dec 2022, 13:29:09

.  u psid7899_mar08;

. keep if status==1;
(2,010 observations deleted)

. gen unemployed=status==3;

. gen unemployed2=status==2 | status==3;

. drop if year==98 & tenure<1;
(103 observations deleted)

. drop if collbarg==.;
(0 observations deleted)

. replace comm=comm==1 | (commis>0 & commis~=.) | piece==1;
(303 real changes made)

. replace boni= (bonus>0 & bonus~=.) | comm==1;
(7,441 real changes made)

. egen maxbon=max(boni), by(jobmatch);

.  /* create bonus job dummy */
> 
> gen educ_bonus=(maxbon==1)*educ;

.  /* interaction of education with
>                                       bonus job dummy) */
> 
> replace avhrly=(avhrly/cpi)*100;
(25,253 real changes made)

. replace hdlaby=(hdlaby/cpi)*100;
(25,407 real changes made)

. drop if avhrly<1.5 | avhrly>100;
(349 observations deleted)

. gen lw=log(avhrly);

. gen type=1 if maxbon==0;
(9,680 missing values generated)

. replace type=2 if maxbon==1;
(9,680 real changes made)

. *summ boni comm [aw=iweight];
. sort type;

. *bys type year: summ salary boni salary_only hourly unemployed unemployed2 hourly_only avhrly educ hours tenure 
> *married collbarg nonwhite potexp hdlaby [aw=iweight];
. *by type: summ salary boni salary_only hourly unemployed unemployed2 hourly_only avhrly educ hours tenure 
> *married collbarg nonwhite potexp hdlaby [aw=iweight];
. *summ salary boni salary_only hourly unemployed unemployed2 hourly_only avhrly educ hours tenure 
> *married collbarg nonwhite potexp hdlaby [aw=iweight];
. by type: summ hdlaby [aw=iweight];

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-> type = 1

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
      hdlaby |  16,466  411451.354    17444.97   10139.78   3.977273   172601.8

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-> type = 2

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
      hdlaby |   9,680  272850.681       24429   17748.53   225.0563   254094.5


. by type: summ hdlaby [aw=iweight] if year == 98;

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-> type = 1

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
      hdlaby |     446   12802.334    19148.88   11142.33   1136.646   83657.16

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-> type = 2

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
      hdlaby |     248    7688.555    30177.96   26940.61   5123.092   231875.8


. log close;
      name:  <unnamed>
       log:  C:\Users\KaSchulz\Documents\Abraham, Doligalski, Schulz, Werquin\Web Appendix\Lemieux_et_al_Mean_Earnings.log
  log type:  text
 closed on:  20 Dec 2022, 13:29:09
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
